Merge branch 'develop' of https://gitee.com/fusenpack/fusenapi into feature/auth

This commit is contained in:
eson
2023-07-28 13:10:32 +08:00
31 changed files with 809 additions and 97 deletions

View File

@@ -13,6 +13,9 @@ service pay {
@handler OrderPaymentIntentHandler
post /api/pay/payment-intent(OrderPaymentIntentReq) returns (response);
@handler StripeWebhookHandler
post /api/pay/stripe-webhook(StripeWebhookReq) returns (response);
}
// 生成预付款
@@ -24,6 +27,15 @@ type (
PayMethod int64 `form:"pay_method"` //支付方式
}
OrderPaymentIntentRes {
RedirectUrl string `json:"redirect_url"`
RedirectUrl string `json:"redirect_url"`
ClientSecret string `json:"clientSecret"`
}
)
// StripeWebhook支付通知
type (
StripeWebhookReq {
Payload []byte `json:"base_byte_slice,optional"`
StripeSignature string `json:"Stripe-Signature"`
}
)

View File

@@ -12,7 +12,7 @@ import "basic.api"
service product-template-tag {
//获取产品模板标签列表
@handler GetProductTemplateTagsHandler
get /api/product-template/get_product_template_tags(GetProductTemplateTagsReq) returns (response);
get /api/product-template-tag/get_product_template_tags(GetProductTemplateTagsReq) returns (response);
}
//获取产品模板标签列表
@@ -20,6 +20,7 @@ type GetProductTemplateTagsReq {
Limit int `form:"limit"`
}
type GetProductTemplateTagsRsp {
Id int64 `json:"id"`
Tag string `json:"tag"`
Cover string `json:"cover"`
}

View File

@@ -12,9 +12,12 @@ 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数据交互
@@ -25,14 +28,19 @@ type DataTransferData {
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"`
@@ -43,5 +51,16 @@ 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"`
}