Merge branch 'develop' of https://gitee.com/fusenpack/fusenapi into feature/auth
This commit is contained in:
@@ -56,8 +56,29 @@ service home-user-auth {
|
||||
@handler UserOrderCancelHandler
|
||||
get /api/user/order-cancel (UserOrderCancelReq) returns (response);
|
||||
|
||||
// 用户logo列表
|
||||
@handler UserLogoListHandler
|
||||
get /api/user/logo-list (UserLogoListReq) returns (response);
|
||||
|
||||
// 再来一单
|
||||
@handler UserAgainOrderHandler
|
||||
get /api/user/one-more-order (UserAgainOrderReq) returns (response);
|
||||
}
|
||||
|
||||
type (
|
||||
UserAgainOrderReq {
|
||||
Sn string `form:"sn"` // 订单编号
|
||||
}
|
||||
UserAgainOrderRes struct{}
|
||||
)
|
||||
|
||||
type (
|
||||
UserLogoListReq {
|
||||
}
|
||||
UserLogoListRes {
|
||||
}
|
||||
)
|
||||
|
||||
type (
|
||||
UserOrderDeleteReq {
|
||||
ID int64 `form:"id"` //订单id
|
||||
|
||||
@@ -14,7 +14,7 @@ service inventory {
|
||||
post /api/inventory/take(TakeReq) returns (response);
|
||||
//获取云仓库存列表
|
||||
@handler GetCloudListHandler
|
||||
get /api/inventory/list(GetCloudListReq) returns (response);
|
||||
post /api/inventory/list(GetCloudListReq) returns (response);
|
||||
//云仓补货
|
||||
@handler SupplementHandler
|
||||
post /api/inventory/supplement(SupplementReq) returns (response);
|
||||
@@ -34,9 +34,9 @@ type TakeForm {
|
||||
}
|
||||
//获取云仓库存列表
|
||||
type GetCloudListReq {
|
||||
Page int `form:"page"`
|
||||
PageSize int `form:"page_size"`
|
||||
Size int64 `form:"size"`
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
Size int64 `json:"size"`
|
||||
}
|
||||
type GetCloudListRsp {
|
||||
WarehouseBoxes int64 `json:"warehouse_boxes"`
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
syntax = "v1"
|
||||
|
||||
info (
|
||||
title: 支付模块
|
||||
desc: 支付相关
|
||||
title: "支付模块"
|
||||
desc: "支付相关"
|
||||
author: ""
|
||||
email: ""
|
||||
)
|
||||
@@ -14,10 +14,20 @@ service pay {
|
||||
@handler OrderPaymentIntentHandler
|
||||
post /api/pay/payment-intent(OrderPaymentIntentReq) returns (response);
|
||||
|
||||
@handler OrderRefundHandler
|
||||
post /api/pay/refund(OrderRefundReq) returns (response);
|
||||
|
||||
@handler StripeWebhookHandler
|
||||
post /api/pay/stripe-webhook(StripeWebhookReq) returns (response);
|
||||
|
||||
}
|
||||
|
||||
// 退款
|
||||
type (
|
||||
OrderRefundReq struct{}
|
||||
OrderRefundRes struct{}
|
||||
)
|
||||
|
||||
// 生成预付款
|
||||
type (
|
||||
OrderPaymentIntentReq {
|
||||
@@ -37,5 +47,6 @@ type (
|
||||
StripeWebhookReq {
|
||||
Payload []byte `json:"base_byte_slice,optional"`
|
||||
StripeSignature string `json:"Stripe-Signature"`
|
||||
RemoteAddr string `json:"remote_addr"`
|
||||
}
|
||||
)
|
||||
@@ -16,10 +16,21 @@ type RequestReadImages {
|
||||
}
|
||||
|
||||
service render {
|
||||
// 发送数据到unity渲染
|
||||
@handler ToUnityHandler
|
||||
get /api/render/to-unity(RequestToUnity) returns (response);
|
||||
// 读图像
|
||||
@handler ReadImagesHandler
|
||||
get /api/render/read-images(RequestReadImages) returns (response);
|
||||
//云渲染完了通知接口
|
||||
@handler RenderNotifyHandler
|
||||
post /api/render/render_notify(RenderNotifyReq) returns (response);
|
||||
//获取面片信息
|
||||
@handler GetFaceSliceHandler
|
||||
post /api/render/get_face_slice(request) returns (response);
|
||||
}
|
||||
|
||||
//渲染完了通知接口
|
||||
type RenderNotifyReq {
|
||||
Sign string `json:"sign"`
|
||||
Time int64 `json:"time"`
|
||||
Info NotifyInfo `json:"info"`
|
||||
}
|
||||
type NotifyInfo {
|
||||
TaskId string `json:"task_id"` //任务id
|
||||
Image string `json:"image"`
|
||||
}
|
||||
@@ -12,17 +12,82 @@ import "basic.api"
|
||||
service upload {
|
||||
@handler UploadUpFileHandler
|
||||
get /api/upload/up-file(RequestUpFile) returns (response);
|
||||
|
||||
|
||||
@handler UploadFileFrontendHandler
|
||||
post /api/upload/upload-file-frontend(RequestUploadFileFrontend) returns (response);
|
||||
|
||||
|
||||
@handler UploadFileBackendHandler
|
||||
post /api/upload/upload-file-backend(RequestUploadFileBackend) returns (response);
|
||||
//生成二维码
|
||||
@handler UploadQrcodeHandler
|
||||
post /api/upload/qrcode(UploadQrcodeReq) returns (response);
|
||||
|
||||
// 上传文件发起--单个文件--后端上传
|
||||
@handler UploadFilesBackendHandler
|
||||
post /api/upload/upload-files-backend(UploadFilesReq) returns (response);
|
||||
|
||||
// 上传文件发起--多个文件--前端上传
|
||||
@handler UploadFilesFrontendHandler
|
||||
post /api/upload/upload-files-frontend(UploadFilesReq) returns (response);
|
||||
|
||||
// 上传文件回调
|
||||
@handler UploadCallbackHandler
|
||||
post /api/upload/upload-callback(UploadCallbackReq) returns (response);
|
||||
|
||||
// 上传LOGO
|
||||
@handler UploadLogoHandler
|
||||
post /api/upload/up-logo(UploadLogoReq) returns (response);
|
||||
|
||||
// 上传文件发起--base64
|
||||
@handler UploadFileBaseHandler
|
||||
post /api/upload/upload-file-base(UploadFileBaseReq) returns (response);
|
||||
|
||||
}
|
||||
|
||||
type (
|
||||
UploadFileBaseReq {
|
||||
ApiType int64 `form:"api_type,options=[1,2],default=1"` // 调用类型:1=对外,2=对内
|
||||
FileKey string `form:"file_key"` // 上传唯一标识信息
|
||||
FileData string `form:"file_data"` // 上传文件额外信息
|
||||
Metadata string `form:"meta_data,optional"` // 上传文件额外信息
|
||||
UserId int64 `form:"user_id,optional"` // 上传文件额外信息
|
||||
GuestId int64 `form:"guest_id,optional"` // 上传文件额外信息
|
||||
UploadBucket int64 `form:"upload_bucket,options=[1,2],default=1"` // 上传桶名:1=缓存,2=持久
|
||||
}
|
||||
)
|
||||
|
||||
type (
|
||||
UploadLogoReq {
|
||||
ResourceId string `form:"resource_id"` // 资源ID
|
||||
ResourceUrl string `form:"resource_url"` // 资源URL
|
||||
IsRemoveBg int64 `form:"is_remove_bg"` // 是否要去掉背景
|
||||
Proportion int64 `form:"proportion,default=60"` // 贴图在模型面板上的比例
|
||||
SkuId int64 `form:"sku_id,default=0"` // 模板ID
|
||||
}
|
||||
)
|
||||
|
||||
type (
|
||||
UploadInfo {
|
||||
FileSize int64 `form:"file_size,optional"` // 上传唯一标识信息
|
||||
FileKeys string `form:"file_keys,optional"` // 上传唯一标识信息
|
||||
Metadata string `form:"meta_data,optional"` // 上传文件额外信息
|
||||
}
|
||||
|
||||
UploadFilesReq {
|
||||
ApiType int64 `form:"api_type,options=[1,2],default=1"` // 调用类型:1=对外,2=对内
|
||||
UploadBucket int64 `form:"upload_bucket,options=[1,2],default=1"` // 上传桶名:1=缓存,2=持久
|
||||
UploadInfo string `form:"upload_info"` // 上传信息 json
|
||||
}
|
||||
UploadCallbackReq {
|
||||
UploadBucket int64 `form:"upload_bucket,options=[1,2],default=1"` // 上传桶名:1=缓存,2=持久
|
||||
ResourceId string `form:"resource_id"` // 资源ID
|
||||
ResourceType string `form:"resource_type"` // 资源类型
|
||||
ResourceUrl string `form:"resource_url"` // 资源URL
|
||||
Metadata string `form:"metadata,optional"` // 元数据,json格式,存储图像分率
|
||||
ApiType int64 `form:"api_type,options=[1,2],default=1"` // 调用类型:1=对外,2=对内
|
||||
}
|
||||
)
|
||||
|
||||
type RequestUpFile {
|
||||
UpFile string `form:"upfile"`
|
||||
IsCut string `form:"is_cut"` // 是否裁剪
|
||||
|
||||
@@ -12,55 +12,4 @@ service websocket {
|
||||
//websocket数据交互
|
||||
@handler DataTransferHandler
|
||||
get /api/websocket/data_transfer(request) returns (response);
|
||||
//云渲染完了通知接口
|
||||
@handler RenderNotifyHandler
|
||||
post /api/websocket/render_notify(RenderNotifyReq) returns (response);
|
||||
//第三方登录通知接口
|
||||
@handler ThirdPartyLoginNotifyHandler
|
||||
post /api/websocket/third_party_login_notify(ThirdPartyLoginNotifyReq) returns (response);
|
||||
}
|
||||
|
||||
//websocket数据交互
|
||||
type DataTransferData {
|
||||
T string `json:"t"` //消息类型
|
||||
D interface{} `json:"d"` //传递的消息
|
||||
}
|
||||
type RenderImageReqMsg { //websocket接受要云渲染处理的数据
|
||||
ProductIds []int64 `json:"product_ids"` //产品 id
|
||||
TemplateTagId int64 `json:"template_tag_id"` //模板标签id
|
||||
LogoId int64 `json:"logo_id"` //logoid
|
||||
AlgorithmVersion string `json:"algorithm_version,optional"` //算法版本
|
||||
}
|
||||
type RenderImageRspMsg { //websocket发送渲染完的数据
|
||||
ProductId int64 `json:"product_id"` //产品 id
|
||||
TemplateTagId int64 `json:"template_tag_id"` //模板标签id
|
||||
AlgorithmVersion string `json:"algorithm_version,optional"` //算法版本
|
||||
LogoId int64 `json:"logo_id"` //logoid
|
||||
Image string `json:"image"` //渲染后的图片
|
||||
}
|
||||
type ThirdPartyLoginRspMsg { //websocket三方登录的通知数据
|
||||
Token string `json:"token"`
|
||||
}
|
||||
//渲染完了通知接口
|
||||
type RenderNotifyReq {
|
||||
Sign string `json:"sign"`
|
||||
Time int64 `json:"time"`
|
||||
Info NotifyInfo `json:"info"`
|
||||
}
|
||||
type NotifyInfo {
|
||||
ProductId int64 `json:"product_id"` //产品id
|
||||
TemplateTagId int64 `json:"template_tag_id"` //模板标签id
|
||||
AlgorithmVersion string `json:"algorithm_version,optional"` //算法版本
|
||||
LogoId int64 `json:"logo_id"` //logoid
|
||||
Image string `json:"image"`
|
||||
}
|
||||
//第三方登录通知接口
|
||||
type ThirdPartyLoginNotifyReq {
|
||||
Sign string `json:"sign"`
|
||||
Time int64 `json:"time"`
|
||||
Info ThirdPartyLoginNotify `json:"info"`
|
||||
}
|
||||
type ThirdPartyLoginNotify {
|
||||
WebsocketId uint64 `json:"websocket_id"`
|
||||
Token string `json:"token"`
|
||||
}
|
||||
Reference in New Issue
Block a user